﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dazzle {
    internal class FileLog : ILog {
        private log4net.ILog _logger;

        internal log4net.ILog InnerLogger {
            get { return _logger; }
            private set { _logger = value; }
        }

        public FileLog(string name) {
            this.InnerLogger = log4net.LogManager.GetLogger(name);
        }

        public FileLog(Type typeName) {
            this.InnerLogger = log4net.LogManager.GetLogger(typeName);
        }

        #region ILog Members

        #region Info

        public void Info(string message) {
            this.InnerLogger.Info(message);
        }

        public void Info(string format, object arg) {
            this.InnerLogger.InfoFormat(format, arg);
        }

        public void Info(string format, object arg0, object arg1) {
            this.InnerLogger.InfoFormat(format, arg0, arg1);
        }

        public void Info(string format, object arg0, object arg1, object arg2) {
            this.InnerLogger.InfoFormat(format, arg0, arg1, arg2);
        }

        public void Info(string format, params object[] args) {
            this.InnerLogger.InfoFormat(format, args);
        }

        public void Info(string message, Exception exception) {
            this.InnerLogger.Info(message, exception);
        }

        #endregion

        public void Error(string message) {
            this.InnerLogger.Error(message);
        }

        public void Error(string format, object arg) {
            this.InnerLogger.ErrorFormat(format, arg);
        }

        public void Error(string format, object arg0, object arg1) {
            this.InnerLogger.ErrorFormat(format, arg0, arg1);
        }

        public void Error(string format, object arg0, object arg1, object arg2) {
            this.InnerLogger.ErrorFormat(format, arg0, arg1, arg2);
        }

        public void Error(string format, params object[] args) {
            this.InnerLogger.ErrorFormat(format, args);
        }

        public void Error(string message, Exception exception) {
            this.InnerLogger.Error(message, exception);
        }

        public void Debug(string message) {
            this.InnerLogger.Debug(message);
        }

        public void Debug(string format, object arg) {
            this.InnerLogger.DebugFormat(format, arg);
        }

        public void Debug(string format, object arg0, object arg1) {
            this.InnerLogger.DebugFormat(format, arg0, arg1);
        }

        public void Debug(string format, object arg0, object arg1, object arg2) {
            this.InnerLogger.DebugFormat(format, arg0, arg1, arg2);
        }

        public void Debug(string format, params object[] args) {
            this.InnerLogger.DebugFormat(format, args);
        }

        public void Debug(string message, Exception exception) {
            this.InnerLogger.Debug(message, exception);
        }

        public void Warn(string message) {
            this.InnerLogger.Warn(message);
        }

        public void Warn(string format, object arg) {
            this.InnerLogger.WarnFormat(format, arg);
        }

        public void Warn(string format, object arg0, object arg1) {
            this.InnerLogger.WarnFormat(format, arg0, arg1);
        }

        public void Warn(string format, object arg0, object arg1, object arg2) {
            this.InnerLogger.WarnFormat(format, arg0, arg1, arg2);
        }

        public void Warn(string format, params object[] args) {
            this.InnerLogger.WarnFormat(format, args);
        }

        public void Warn(string message, Exception exception) {
            this.InnerLogger.Warn(message, exception);
        }

        #endregion
    }
}
